Clarify that one cannot use the same variable
authorWouter Verhelst <w@uter.be>
Thu, 31 Mar 2016 09:09:41 +0000 (11:09 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 5 Apr 2016 15:01:53 +0000 (11:01 -0400)
commit28fc4de6aaed944d223c7a84ecb6ef3c6d340e3b
tree890c4e5ae95afce222aad6077c3461c40464d825
parent93363551d74c50734f1f3149d95f1e79f4fe0191
Clarify that one cannot use the same variable

A naive way to perform an action on all parent nodes of a given node
could be to do:

while(gtk_tree_model_iter_parent(model, &iter, &iter)) {
/* perform some action on iter here */
}

However, since gtk_tree_model_iter_parent() will initialize the iterator
pointed to by the second parameter before performing the lookup, this
will not work.

Explicitly document this behaviour.

Signed-off-by: Wouter Verhelst <w@uter.be>
https://bugzilla.gnome.org/show_bug.cgi?id=573380
gtk/gtktreemodel.c